//身份选择，旋转
$(function() {
  $(window).resize(function(){
    $("#chooseBox").removeAttr("style");
    var winH = $(window).height(),
        chooseBoxH = $("#chooseBox").width();
    if(winH < chooseBoxH){
        $("#chooseBox").width(winH*.8);
        chooseBoxH = winH*.8;

    }
    $("#chooseBox").height(chooseBoxH).css({
      'margin-top': (winH - chooseBoxH)/2 + 'px'
    });
  }).resize();



  
  animate_rotate();
  $('#circle-around .circle').on('mouseover', function(){
    clearInterval(animate);
  }).on('mouseleave', function(){
    animate_rotate();
  })

})


//旋转动画
var angle = 0;
function animate_rotate() {
  animate = window.setInterval(function(){
    angle +=1;
    $('#circle-around').rotate(angle);
    $('#circle-around .circle').rotate(-angle);
  }, 100);
}